@layout("/common/default.html",{title:'生成方案配置'}){
<!--form表单-->
<form class="layui-form"  lay-filter="layui-form-scheme" id="layui-form-scheme">
    <input type="hidden" id="onlyid" name="id" value="${genScheme.id!}">
    <input type="hidden" id="op" name="op" value="${genScheme.op!}">
    <div class="layui-fluid">
        <div class="layui-card">
            <div class="layui-card-header">基本信息</div>
            <div class="layui-card-body">
                <div class="layui-form-item layui-row">

                    <div class="layui-inline layui-col-md9">
                        <label class="layui-form-label layui-required">方案名称</label>
                        <div class="layui-input-block">
                            <input type="text"  id="name" name="name" value="${genScheme.name!}"   autocomplete="off" class="layui-input" lay-verify="required" >
                        </div>
                        <div class="layui-form-mid layui-word-aux" style="margin-left: 104px;">结构：{包名}/{模块名}/{分层(dao,entity,service,web)}/{子模块名}/{java类}</div>
                    </div>


                    <div class="layui-inline layui-col-md9">
                        <label class="layui-form-label layui-required">包路径</label>
                        <div class="layui-input-block">
                            <input type="text"  id="packageName"   name="packageName" value="${genScheme.packageName!}"  lay-verify="required" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-form-mid layui-word-aux" style="margin-left: 104px;">建议模块包：com.xxxxx.safe</div>
                    </div>

                    <div class="layui-inline layui-col-md9">
                        <label class="layui-form-label layui-required">模块名</label>
                        <div class="layui-input-block">
                            <input type="text" id="moduleName"   name="moduleName" value="${genScheme.moduleName!}"  lay-verify="required"  autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-form-mid layui-word-aux" style="margin-left: 104px;">可理解为子系统名，例如 sys</div>
                    </div>

                    <div class="layui-inline layui-col-md9">
                        <label class="layui-form-label ">子模块名</label>
                        <div class="layui-input-block">
                            <input type="text"  id="subModuleName" name="subModuleName" value="${genScheme.subModuleName!}"  lay-verify="" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-form-mid layui-word-aux" style="margin-left: 104px;">可选，分层下的文件夹</div>
                    </div>


                    <div class="layui-inline layui-col-md9">
                        <label class="layui-form-label layui-required">功能描述</label>
                        <div class="layui-input-block">
                            <input type="text"  id="functionName" name="functionName" value="${genScheme.functionName!}"   lay-verify="required" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-form-mid layui-word-aux" style="margin-left: 104px;">将设置到类描述</div>
                    </div>

                    <div class="layui-inline layui-col-md9">
                        <label class="layui-form-label">生成功能名</label>
                        <div class="layui-input-block">
                            <input type="text" id="functionNameSimple" name="functionNameSimple" value="${genScheme.functionNameSimple!}"  autocomplete="off" class="layui-input" >
                        </div>
                        <div class="layui-form-mid layui-word-aux" style="margin-left: 104px;">可选，功能提示</div>
                    </div>


                    <div class="layui-inline layui-col-md9">
                        <label class="layui-form-label layui-required">开发者</label>
                        <div class="layui-input-block">
                            <input type="text" id="functionAuthor" name="functionAuthor" value="${genScheme.functionAuthor!}"  autocomplete="off" lay-verify="required" class="layui-input" >
                        </div>
                        <div class="layui-form-mid layui-word-aux" style="margin-left: 104px;">功能开发者</div>
                    </div>
                    <div class="layui-inline layui-col-md9">
                        <label class="layui-form-label layui-required">业务表名</label>
                        <div class="layui-input-block">
                            <#select path="genTable.id" items="${table}" value="${genScheme.genTable.id!}"  lay-filter="table_name"
                            lay-search="true" lay-verify="required" placeholder="请选择表"/>
                        </div>
                        <div class="layui-form-mid layui-word-aux" style="margin-left: 104px;">生成的数据表</div>
                    </div>

                </div>
            </div>

        </div>
        <div class="form-group-bottom" style="z-index: 200" align="center">
            <button class="layui-btn" lay-filter="btnSubmit" lay-submit>&emsp;生成代码&emsp;</button>
            <button   id="btnclose" class="layui-btn layui-btn-primary"  >&emsp;取消&emsp;</button>
        </div>
    </div>
</form>
<script>
    layui.use(['form', 'submitform', 'openLayer','resAjax','treeSelect'], function () {

        var $ = layui.$,
            form = layui.form,
            resAjax=layui.resAjax,
            submitform=layui.submitform,
            openLayer = layui.openLayer;


        /**
         * 保存不生成
         */
        form.on("submit(btnSubmit)", function (data) {
            var field=data.field;
            //询问框
            openLayer.confirm("此操作会覆盖之前的代码，确认执行吗？", function () {
                // 请求后台
                submitform.form('/gen/genScheme/save',field);
                });
            return false; // 阻止提交行为！！


        });


    });

</script>

@}
